package com.dotflat.fin.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 系统流水
 */

@Data
@Entity
@Table(name="fin_system_wallet_flow")
@EqualsAndHashCode(callSuper = true)
public class SystemWalletFlow extends AreableObjectBase {

    @Column(length = 32)
    private String clienteleId;

    @Column(columnDefinition = "VARCHAR(516) COMMENT '业务名称'")
    private String businessName;

    @Column(name = "business_time",columnDefinition="DATETIME COMMENT '业务时间'")
    private Date businessTime;

    @Column(columnDefinition = "VARCHAR(516) COMMENT '来往单位'")
    private String companyName;

    @Column(columnDefinition = "VARCHAR(516) COMMENT '账户名称'")
    private String accountName;

    @Column(columnDefinition = "VARCHAR(516) COMMENT '收款账户'")
    private String accountNum;

    @Column(columnDefinition = "INT default 0 COMMENT '业务总金额'")
    private Long totalMoney = 0L;

    @Column(columnDefinition = "INT default 0 COMMENT '项目金额'")
    private Long projectMoney = 0L;

    @Column(columnDefinition = "INT default 0 COMMENT '收入金额'")
    private Long incomeMoney = 0L;

    @Column(columnDefinition = "INT default 0 COMMENT '支出金额'")
    private Long payMoney = 0L;

    @Column(columnDefinition = "INT COMMENT '类型：0.无变化 1. 进账 2. 出账'")
    private Integer type;

//    @Column(columnDefinition = "INT COMMENT '单据类型: 1. 托管金额 2. 项目金额 3.用户提现 4.用户退款'")
//    private Integer billType;

    @Column(columnDefinition = "INT COMMENT '操作类型：0. 无变化 1. 现金动账 2. 项目操作 3. 系统操作'")
    private Integer sourceType;


}
